import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: HomeView,
        children: [

           {
                path: '/welcome',
                component: () => import('../views/pdms/Welcome')
            },
            {
                path: '/projects/createProject',
                component: () => import('../views/pdms/project/ProjectAddNewView')
            },
            {
                path: '/projects/getProjectList',
                component: () => import('../views/pdms/project/ProjectListView')
            },
            {
                path: '/projects/detail',
                component: () => import('../views/pdms/project/ProjectDetail')
            }
            ,{
                path: '/knows',
                component: () => import('../views/pdms/know/KnowList')
            },
            {
                path: '/knows/add-new',
                component: () => import('../views/pdms/know/KnowAddNew')
            },
            {
                path: '/knows/update',
                component: () => import('../views/pdms/know/KnowUpdate')
            },
            {
                path: '/knows/details',
                component: () => import('../views/pdms/know/KnowDetails')
            },
            {
                path: '/req',
                component: () => import('../views/pdms/req/ReqList')
            },
            {
                path: '/req/add-new',
                component: () => import('../views/pdms/req/ReqAddNew')
            },
            {
                path: '/req/update',
                component: () => import('../views/pdms/req/ReqUpdate')
            },
            {
                path: '/req/details',
                component: () => import('../views/pdms/req/ReqDetails')
            },
            {
                path: '/tasks/add-new',
                component: () => import('../views/pdms/know/TaskAddNew')
            },
            {
                path: '/tasks',
                component: () => import('../views/pdms/know/TaskList')
            },
            {
                path: '/quests/add-new',
                component: () => import('../views/pdms/know/QuestAddNew')
            },
            {
                path: '/quests',
                component: () => import('../views/pdms/know/QuestList')
            },
            {
                path: '/logs',
                component: () => import('../views/pdms/log/Logs.vue')
            },
            {
                path: '/projects/socketTest',
                component: () => import('../views/pdms/new/News.vue')
            },
            {
                path:'/bugs/add-new',
                component:() => import('../views/pdms/bug/BugAddNewView')
            },
            {
                path:'/bugs',
                component:() => import('../views/pdms/bug/BugListView')
            },
            {
                path: '/sys-user/class/class',
                component: () => import('../views/pdms/class/Class.vue')
            },
            {
                path: '/sys-user/class/team',
                component: () => import('../views/pdms/class/ProjectTeam')
            },
            {
                path: '/sys-user/user/role',
                component: () => import('../views/pdms/user/RolePermission')
            }

        ]
    },
    {
        path: '/login',
        component: () => import('../views/LoginView')
    }

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
